package com.stockz.equity.charting.painter.indicator;

import java.awt.Graphics2D;
import java.awt.Rectangle;

import org.springframework.stereotype.Component;

import com.stockz.equity.charting.display.indicator.SupportResistenceDisplayableIndicatorConfiguration;
import com.stockz.equity.charting.view.StockChartPanelState;
import com.stockz.equity.pattern.Painter;

@Component
public class SupportResistenceIndicatorPainter implements Painter<SupportResistenceDisplayableIndicatorConfiguration> {

	@Override
	public void paint(Graphics2D g,
			SupportResistenceDisplayableIndicatorConfiguration display,
			Rectangle rectangle) {
		StockChartPanelState state = display.getStockChartView().getSelectedStockChart().getStockChartPanel().getStockChartPanelState();
		 state.getShapeSet().addAll(display.getLines());
	}
}
